import { port , corsConfig } from './Config/index.js'
import Koa from 'koa'
import { GetRouter } from './Component/Router/index.js'
import { sync } from './Component/DB/index.js'
import cors from 'koa2-cors'

sync()
let app = new Koa()

app.use(cors(corsConfig))
app.use(GetRouter(app))

app.listen(port,() => console.log(`Server is runing : http://127.0.0.1:${port}`))
